package xiao_jin.fantastic_journey.core.init;

import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.SpawnGroup;
import net.minecraft.registry.Registries;
import net.minecraft.registry.Registry;
import net.minecraft.resource.featuretoggle.FeatureSet;
import net.minecraft.resource.featuretoggle.ToggleableFeature;
import net.minecraft.util.TypeFilter;
import org.jetbrains.annotations.Nullable;
import xiao_jin.fantastic_journey.core.common.entity.custom.MonsterEyeEntity;
import xiao_jin.fantastic_journey.util.ModUtil;

public final class ModEntities<T extends Entity> implements ToggleableFeature, TypeFilter<Entity, T> {

    public static final EntityType<MonsterEyeEntity> MONSTER_EYE_ENTITY = register(
            "monster_eye_entity", EntityType.Builder.create(MonsterEyeEntity::new, SpawnGroup.CREATURE).dimensions(5, 5).eyeHeight(2.5F).maxTrackingRange(100)
    );

    private static <T extends Entity> EntityType<T> register(String id, EntityType.Builder<T> type) {
        return Registry.register(Registries.ENTITY_TYPE, ModUtil.getIdOfMod(id), type.build(id));
    }

    @Override
    public FeatureSet getRequiredFeatures() {
        return null;
    }

    @Nullable
    @Override
    public T downcast(Entity obj) {
        return null;
    }

    @Override
    public Class<? extends Entity> getBaseClass() {
        return null;
    }
}
